package chabernac.gravidroid.paint;

import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Rect;
import android.view.View;
import chabernac.android.draw.AbstractDrawable;
import chabernac.android.draw.SurfaceViewAnimation;

public class BorderDrawable extends AbstractDrawable{
	private Paint myPaint = null;
	private Rect myDrawingRect = new Rect();

	public BorderDrawable(){
		myPaint = new Paint();
		myPaint.setColor(Color.WHITE);
		myPaint.setStyle(Style.STROKE);
		myPaint.setStrokeWidth(20);
	}

	@Override
	public void paint(Canvas aCanvas, View aView) {
		if(aView instanceof SurfaceViewAnimation){
			SurfaceViewAnimation theSurfaceView = (SurfaceViewAnimation)aView;
			theSurfaceView.getDrawingRect(myDrawingRect);
			aCanvas.drawRect(myDrawingRect, myPaint);
		}
	}

}
